package cuiweiyou.headerrecycleview.adapter;



import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

public class FragmentAdapter extends FragmentPagerAdapter {
    private String tv_title;
    List<Fragment> mfragmentList=new ArrayList<>();

    public FragmentAdapter(FragmentManager fm, List<Fragment> fragmentList, String title) {
        super(fm);
        mfragmentList=fragmentList;
        tv_title = title;
    }

    @Override
    public Fragment getItem(int position) {
        return mfragmentList.get(position);
    }

    @Override
    public int getCount() {
        return mfragmentList.size();
    }
}
